Skip to content

Reflect broken symlinks in resources model - #2798

Open
iloveeclipse wants to merge 2 commits into
eclipse-platform:masterfrom
iloveeclipse:broken_symlink_support
Open

Reflect broken symlinks in resources model#2798
iloveeclipse wants to merge 2 commits into
eclipse-platform:masterfrom
iloveeclipse:broken_symlink_support

Conversation

@iloveeclipse

@iloveeclipse iloveeclipse commented Jul 3, 2026

Copy link
Copy Markdown
Member

For link overlays we need an additional patch in Platform UI (eclipse-platform/eclipse.platform.ui#4158).

Fixes #2797

@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Test Results

    54 files  ±0      54 suites  ±0   57m 41s ⏱️ -38s
 4 766 tests +1   4 744 ✅ +1   22 💤 ±0  0 ❌ ±0 
12 189 runs  +3  12 034 ✅ +1  155 💤 +2  0 ❌ ±0 

Results for commit ee286af. ± Comparison against base commit 470ac3d.

♻️ This comment has been updated with latest results.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Eclipse Core Resources / EFS stack so broken (dangling) symbolic links are surfaced in the workspace resource model (enabling UI overlays and user visibility/removal), including Linux-native support and accompanying regression tests.

Changes:

  • Treat dangling symlinks as “present” resources in workspace tree logic and attribute lookup (so they appear in members/refresh and can be deleted).
  • Preserve symlink metadata (lstat) for dangling links in Linux native implementations, and expose link target/attributes via EFS.
  • Add/extend tests to validate dangling symlink visibility and “read as empty content” behavior.

Reviewed changes

Copilot reviewed 8 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/internal/localstore/SymlinkResourceTest.java Adds a workspace-level regression test ensuring broken symlinks appear as child IFile resources and behave safely for read APIs.
resources/tests/org.eclipse.core.tests.resources/src/org/eclipse/core/tests/filesystem/SymlinkTest.java Extends filesystem-level tests for broken symlink timestamps/lengths and recursive symlink existence expectations.
resources/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/resources/ResourceTree.java Ensures deletes don’t treat broken symlinks as “nonexistent on disk”.
resources/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/localstore/UnifiedTreeNode.java Treats symlink nodes as existing in filesystem even when targets are missing.
resources/bundles/org.eclipse.core.resources/src/org/eclipse/core/internal/localstore/FileSystemResourceManager.java Returns ResourceAttributes for broken symlinks (instead of null).
resources/bundles/org.eclipse.core.filesystem/src/org/eclipse/core/internal/filesystem/local/LocalFile.java Makes read APIs return empty content for dangling symlinks rather than erroring as “file not found”.
resources/bundles/org.eclipse.core.filesystem/src/org/eclipse/core/internal/filesystem/local/linux/LinuxFileNatives.java Preserves symlink-node metadata for dangling links (while keeping “target missing” exists=false semantics).
resources/bundles/org.eclipse.core.filesystem/natives/unix/fastlinux/fastlinuxfile.c Retains lstat data for dangling links when following the link fails during directory listing/stat conversion.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@iloveeclipse
iloveeclipse force-pushed the broken_symlink_support branch 2 times, most recently from fc29ebb to d4c4f3a Compare August 3, 2026 14:17
Broken file links were not present in resource model before, now they
are (at least with Linux x86_64 LinuxFileHandler or Java NIO
PosixHandler, in the future hopefully on all Unix
platforms).

For "broken" link overlays we need an additional patch in Platform UI.

Fixes eclipse-platform#2797
@iloveeclipse
iloveeclipse force-pushed the broken_symlink_support branch from d4c4f3a to 9e1b8b8 Compare September 2, 2026 11:59
@eclipse-platform-bot

Copy link
Copy Markdown
Contributor

This pull request changes some projects for the first time in this development cycle.
Therefore the following files need a version increment:

resources/bundles/org.eclipse.core.filesystem.linux.x86_64/META-INF/MANIFEST.MF
resources/bundles/org.eclipse.core.filesystem.linux.x86_64/pom.xml
resources/bundles/org.eclipse.core.filesystem/META-INF/MANIFEST.MF

An additional commit containing all the necessary changes was pushed to the top of this PR's branch. To obtain these changes (for example if you want to push more changes) either fetch from your fork or apply the git patch.

Git patch
From 0c652ecec12edd1de1bb1088d6235d9b9718a0ca Mon Sep 17 00:00:00 2001
From: Eclipse Platform Bot <platform-bot@eclipse.org>
Date: Wed, 2 Sep 2026 12:09:30 +0000
Subject: [PATCH] Version bump(s) for 4.42 stream


diff --git a/resources/bundles/org.eclipse.core.filesystem.linux.x86_64/META-INF/MANIFEST.MF b/resources/bundles/org.eclipse.core.filesystem.linux.x86_64/META-INF/MANIFEST.MF
index c87b4505a5..6931428e8f 100644
--- a/resources/bundles/org.eclipse.core.filesystem.linux.x86_64/META-INF/MANIFEST.MF
+++ b/resources/bundles/org.eclipse.core.filesystem.linux.x86_64/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %fragmentName
 Bundle-SymbolicName: org.eclipse.core.filesystem.linux.x86_64; singleton:=true
-Bundle-Version: 1.2.500.qualifier
+Bundle-Version: 1.2.600.qualifier
 Bundle-Vendor: %providerName
 Fragment-Host: org.eclipse.core.filesystem;bundle-version="[1.11.500,2.0.0)"
 Bundle-Localization: fragment
diff --git a/resources/bundles/org.eclipse.core.filesystem.linux.x86_64/pom.xml b/resources/bundles/org.eclipse.core.filesystem.linux.x86_64/pom.xml
index c44e07f8d4..656c1f6701 100644
--- a/resources/bundles/org.eclipse.core.filesystem.linux.x86_64/pom.xml
+++ b/resources/bundles/org.eclipse.core.filesystem.linux.x86_64/pom.xml
@@ -18,7 +18,7 @@
     <relativePath>../../</relativePath>
   </parent>
   <artifactId>org.eclipse.core.filesystem.linux.x86_64</artifactId>
-  <version>1.2.500-SNAPSHOT</version>
+  <version>1.2.600-SNAPSHOT</version>
   <packaging>eclipse-plugin</packaging>
 
   <profiles>
diff --git a/resources/bundles/org.eclipse.core.filesystem/META-INF/MANIFEST.MF b/resources/bundles/org.eclipse.core.filesystem/META-INF/MANIFEST.MF
index 5bea0c1356..46aaaccaef 100644
--- a/resources/bundles/org.eclipse.core.filesystem/META-INF/MANIFEST.MF
+++ b/resources/bundles/org.eclipse.core.filesystem/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
 Bundle-ManifestVersion: 2
 Bundle-Name: %pluginName
 Bundle-SymbolicName: org.eclipse.core.filesystem; singleton:=true
-Bundle-Version: 1.11.500.qualifier
+Bundle-Version: 1.11.600.qualifier
 Bundle-Localization: plugin
 Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.29.0,4.0.0)"
 Export-Package: org.eclipse.core.filesystem;uses:="org.eclipse.core.runtime",
-- 
2.55.0

Further information are available in Common Build Issues - Missing version increments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Broken symlinks not reflected in Eclipse resources model

3 participants